// 定义key
const TOKENKEY = 'top-line-token'
// 保存
const saveToken = tokenObj => {
  window.localStorage.setItem(TOKENKEY, JSON.stringify(tokenObj))
}
// 删除
const removeToken = () => {
  window.localStorage.removeItem(TOKENKEY)
}
// 获取
const getToken = () => {
  return JSON.parse(window.localStorage.getItem(TOKENKEY))
}
// 暴露出去
export { saveToken, removeToken, getToken }
